import { ref, h } from "vue";
import { render } from "@/utils";
import TagStatus from "@/components/TagStatus/index.vue";

export const columns = [
  {
    title: "名称",
    dataIndex: "dictLabel",
  },
  {
    title: "标识",
    dataIndex: "dictValue",
    render,
  },
  {
    title: "字典类型",
    dataIndex: "dictType",
    render,
  },
  {
    title: "是否启用",
    width: 90,
    // render: ({ record }) => h(TagStatus, { type: record.status }),
    render: ({ record }) => Number(record.status) ? '是' :'否',
  },
  {
    title: "创建人",
    dataIndex: "createBy",
    render,
  },
  {
    title: "创建时间",
    dataIndex: "createTime",
    render,
  },
  {
    title: "备注",
    dataIndex: "remark",
    render,
  },
  {
    title: "操作",
    width: 120,
    dataIndex: "action",
    fixed: "right",
    slotName: "action",
  },
]
